package Queue;

import bin_tree.heap.MaxHeap;

public class PriorityQueue implements Queue {
    MaxHeap heap=new MaxHeap();
    @Override
    public void offer(int value) {
        heap.add(value);
    }

    @Override
    public int poll() {
        return heap.extractMax();
    }

    @Override
    public int peek() {
        return heap.peekHeap();
    }

    @Override
    public boolean isEmpty() {
        return heap.isEmpty();
    }
}
